package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcDiscuss;
import com.visizen.wisdomclass.server.model.WcDiscussExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcDiscussMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcDiscussSqlProvider.class, method="countByExample")
    int countByExample(WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcDiscussSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_discuss",
        "where discuss_id = #{discuss_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long discuss_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_discuss (discuss_id, topic_id, ",
        "user_id, equip_id, ",
        "discuss_time, is_anonymous, ",
        "content)",
        "values (#{discuss_id,jdbcType=BIGINT}, #{topic_id,jdbcType=BIGINT}, ",
        "#{user_id,jdbcType=BIGINT}, #{equip_id,jdbcType=BIGINT}, ",
        "#{discuss_time,jdbcType=TIMESTAMP}, #{is_anonymous,jdbcType=INTEGER}, ",
        "#{content,jdbcType=LONGVARCHAR})"
    })
    int insert(WcDiscuss record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcDiscussSqlProvider.class, method="insertSelective")
    int insertSelective(WcDiscuss record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcDiscussSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="equip_id", property="equip_id", jdbcType=JdbcType.BIGINT),
        @Result(column="discuss_time", property="discuss_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="is_anonymous", property="is_anonymous", jdbcType=JdbcType.INTEGER),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<WcDiscuss> selectByExampleWithBLOBs(WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcDiscussSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="equip_id", property="equip_id", jdbcType=JdbcType.BIGINT),
        @Result(column="discuss_time", property="discuss_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="is_anonymous", property="is_anonymous", jdbcType=JdbcType.INTEGER)
    })
    List<WcDiscuss> selectByExample(WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "discuss_id, topic_id, user_id, equip_id, discuss_time, is_anonymous, content",
        "from wc_discuss",
        "where discuss_id = #{discuss_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="user_id", jdbcType=JdbcType.BIGINT),
        @Result(column="equip_id", property="equip_id", jdbcType=JdbcType.BIGINT),
        @Result(column="discuss_time", property="discuss_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="is_anonymous", property="is_anonymous", jdbcType=JdbcType.INTEGER),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    WcDiscuss selectByPrimaryKey(Long discuss_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcDiscuss record, @Param("example") WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") WcDiscuss record, @Param("example") WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcDiscuss record, @Param("example") WcDiscussExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcDiscuss record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @Update({
        "update wc_discuss",
        "set topic_id = #{topic_id,jdbcType=BIGINT},",
          "user_id = #{user_id,jdbcType=BIGINT},",
          "equip_id = #{equip_id,jdbcType=BIGINT},",
          "discuss_time = #{discuss_time,jdbcType=TIMESTAMP},",
          "is_anonymous = #{is_anonymous,jdbcType=INTEGER},",
          "content = #{content,jdbcType=LONGVARCHAR}",
        "where discuss_id = #{discuss_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKeyWithBLOBs(WcDiscuss record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss
     *
     * @mbggenerated
     */
    @Update({
        "update wc_discuss",
        "set topic_id = #{topic_id,jdbcType=BIGINT},",
          "user_id = #{user_id,jdbcType=BIGINT},",
          "equip_id = #{equip_id,jdbcType=BIGINT},",
          "discuss_time = #{discuss_time,jdbcType=TIMESTAMP},",
          "is_anonymous = #{is_anonymous,jdbcType=INTEGER}",
        "where discuss_id = #{discuss_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcDiscuss record);
}